home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_09_02 / 9n02031a < prev    next >
Text File  |  1990-12-11  |  356b  |  16 lines

  1.  
  2.  
  3. int
  4. TreeSearch( int NodeNumb, int Value )
  5. {
  6.         while( NodeNumb != -1 && Value
  7.                         != Tree[NodeNumb].Data )
  8.         {
  9.                 if( Value < Tree[NodeNumb].Data )
  10.                         NodeNumb = Tree[NodeNumb].Left;
  11.                 else
  12.                         NodeNumb = Tree[NodeNumb].Right;
  13.         }
  14. }
  15.  
  16.